#ifndef __PID_controller_H__
#define __PID_controller_H__
typedef struct
{
    double Kp, Ki, Kd, limit_negative, limit_positive;
    double Ki_one_cent, max_ki_set, min_ki_set;
    double error_now, error_last, error_preview, error_diffs, error_sum;
    double pid_output;

} pid_virables;
void set_pid_params(pid_virables *pid_position_controller, double pid_kp, double pid_Ki, double pid_kd, double pid_limit_nagative, double pid_limit_positive);
double calculate_pid_output(pid_virables *pid_position_controller, double error_now_come);

#endif
